package designpattern.template.lock;

public class RedisLockTemplate extends AbstractLockTemplate {

    @Override
    protected void lock(String key, float releaseTime) {
        if (key != null) redisLock(key,releaseTime);
    }

    @Override
    protected void unLock() {
        redisUnLock();
    }

    private void redisLock(String key, float releaseTime){
        System.out.println("redis加锁");
    }

    private void redisUnLock(){
        System.out.println("redis解锁");
    }
}
